package com.infore.quartz.main.job;


/**
* @Deacription 
* @MethodName 
* @Author lijianhua
* @Date 2023/11/27 9:57
* @最后修改人: lijianhua
* @最后修改时间：2023/11/27 9:57
* @Version 4.0
* @param null
* @return {@link null}
**/

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 简单的执行任务, 打印时间和你好
 * 实现接口Job 从写方法execute
 * 该方法就是你定时器执行任务的逻辑
 */
public class ByeJob implements BaseJob {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        String nowTime = simpleDateFormat.format(new Date());
        //这里为了演示, 只进行打印
        System.out.println(nowTime + ":再见");
    }
}
